package cn.bearspark.forward.provider.rpc;

import cn.bearspark.forward.provider.service.ForwardService;
import cn.bearspark.forward.rpc.ForwardRpc;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author f
 */
@Component
@DubboService
public class ForwardRpcImpl implements ForwardRpc {

    private final ForwardService forwardService;

    public ForwardRpcImpl(ForwardService forwardService) {
        this.forwardService = forwardService;
    }

    @Override
    public boolean forwardHappening(long userId, long happeningId) {
        return forwardService.forwardHappening(userId, happeningId);
    }

    @Override
    public List<Long> pageHappeningForwardedUserId(int pageNum, int pageSize, long happeningId) {
        return forwardService.pageHappeningForwardedUserId(pageNum, pageSize, happeningId);
    }
}
